<template>
  <div>
    <div class="sub_title">车辆信息</div>
    <table-detail :table-config="tableConfig" :dialog-config="dialogConfig" />
    <div class="sub_title mt-10">包月信息</div>
    <table-detail :table-config="tableConfig1" :dialog-config="dialogConfig" />
  </div>
</template>

<script>
import TableDetail from '@/components/table-detail'
export default {
  components: {
    TableDetail
  },
  props: {
    dialogConfig: {
      type: Object,
      default () {
        return {
          show: false,
          title: '标题',
          width: '30%',
          data: {}
        }
      }
    }
  },
  data () {
    return {
      tableConfig: {
        span: '2',
        data: [
          {
            label: '所属车场',
            key: 'parkName'
          },
          {
            label: '车型',
            key: 'type'
          },
          {
            label: '车牌号',
            key: 'plate'
          },
          {
            label: '车牌颜色',
            key: 'color'
          },
          {
            label: '车主姓名',
            key: 'owner'
          },
          {
            label: '车主电话',
            key: 'phone'
          },
          {
            label: '添加时间',
            key: 'createTime'
          },
        ]
      },
      tableConfig1: {
        span: '2',
        data: [
          {
            label: '包月生效日期',
            key: 'startTime'
          },
          {
            label: '包月结束日期',
            key: 'endTime'
          },
          {
            label: '包月时长',
            key: 'num'
          },
          {
            label: '剩余天数',
            key: 'day'
          },
        ]
      }
    }
  }
}
</script>
<style lang="scss" scoped>
.sub_title{
  height: 40px;
  line-height: 40px;
  font-size: 16px;
  font-weight: 500;
}
</style>

